/*
	ShieldReactive.h
	(c)2004 Palestar, Richard Lyle
*/

#ifndef SHIELD_REACTIVE_H
#define SHIELD_REACTIVE_H

#include "Game/GadgetShield.h"



//----------------------------------------------------------------------------

class ShieldReactive : public GadgetShield
{
public:
	DECLARE_WIDGET_CLASS();

	// NounGadget interface
	int	addValue() const
	{
		return 3800;
	}
	Type type() const
	{
		return SHIELD;
	}
	float addSignature() const
	{
		return active() ? 0.5f : 0.0f;
	}
	int	maxDamage() const
	{
		return 4000 + (250 * level());
	}
	int buildTechnology() const
	{
		return 50;
	}
	int	buildCost() const
	{
		return 50;
	}
	dword buildFlags() const
	{
		return NounPlanet::FLAG_METALS;
	}
	int	buildTime() const
	{
		return 460;
	}
	// GadgetShield interface
	bool canDeflect( dword nType ) const
	{
		return (nType & (DAMAGE_KINETIC | DAMAGE_ENERGY | DAMAGE_ELF | DAMAGE_EMP)) != 0;
	}
	int	energyCost() const
	{
		return 2;
	}
	int chargeEnergyCost() const
	{
		return 3;
	}
	int maxCharge() const
	{
		return (19750 + (4900 * level())) * modifier();
	}//Add 2000 -JBUD-
	int chargeRate() const
	{
		return ((maxCharge() / 2600) + 2);
		//return 16; //Returned leveled charge rate -JBUD-
	}
	float damageModifier( dword nType ) const
	{
		if ( nType & (DAMAGE_KINETIC) )
			return 0.5f;		// Kenetic damage is less effective against this shield type
		return 1.0f;
	}
};

//----------------------------------------------------------------------------

#endif

//----------------------------------------------------------------------------
// EOF
